package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_user_label;

//DAO
public interface U_user_labelMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_USER_LABEL  WHERE ID = #{id}")
	public ApiU_user_label findU_user_labelById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_user_label")
	public List<ApiU_user_label> findU_user_labels();

	// 添加
	@Insert("INSERT INTO U_USER_LABEL (USER_ID, CATE_ID, CATE_NAME, LABEL_ID, LABEL_NAME, TYPE, EXT1, EXT2, EXT3, EXT4, EXT5) VALUES (#{user_id}, #{cate_id}, #{cate_name}, #{label_id}, #{label_name}, #{type}, #{ext1}, #{ext2}, #{ext3}, #{ext4}, #{ext5})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_user_label(ApiU_user_label u_user_label);

	// 修改
	@Update("UPDATE U_USER_LABEL SET USER_ID = #{USER_ID}, CATE_ID = #{CATE_ID}, CATE_NAME = #{CATE_NAME}, LABEL_ID = #{LABEL_ID}, LABEL_NAME = #{LABEL_NAME}, TYPE = #{TYPE}, EXT1 = #{EXT1}, EXT2 = #{EXT2}, EXT3 = #{EXT3}, EXT4 = #{EXT4}, EXT5 = #{EXT5} WHERE ID = #{ID}")
	public int updateU_user_label(ApiU_user_label u_user_label);

	// 删除
	@Delete("DELETE FROM U_USER_LABEL  WHERE ID = #{id}")
	public int deleteU_user_label(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
